<template>
	<view class="">
		<view v-for="(item,index) in list" :key="index" class="list b">
			<view style="font-size: 32rpx;font-weight: bold" v-if="item.storeName">{{item.storeName}}</view>
			<view class="u-flex u-row-between u-margin-top-20">
				<view >{{item.cardName}}</view>
				<view>每日限时{{item.freeTime}}分钟</view>
			</view>
			<view class="u-flex u-row-between u-margin-top-20 u-font-xs">
                到期时间:{{item.endStr}}
			</view>
			
			<view class="buy u-margin-top-20" @click="buy(item)">
				续费
				
			</view>
			
		
		</view>
		<u-loadmore :status="initial.status" v-if="list.length" />
	</view>
</template>

<script>
	import loader from '@/common/loadPage.js';
	export default {
		mixins: [loader],
		data() {
			return {
				list: [],
				initial: {
					geturl: "/api/user/card",
					parm: {
						
					},
					isPage: true
				},
			}
		},
		onLoad(option) {
			if(option.id){
				this.initial.parm.store_id=option.id
			}
		},
		onShow() {
			this.getGoods()
		},
		methods: {
              buy(item){
				  uni.navigateTo({
				  	url:'../list/detail?id='+item.storeId
				  })
			  }
		}
	}
</script>

<style>
	
	.list {
		padding: 20rpx;
		color: #fff;
		border-radius: 20rpx;
		margin: 20rpx auto;
		width: 700rpx;
	}
	
	.b {
		background: linear-gradient(94deg, #4BA6FF 0%, #0064C6 100%);
	}
	
	.g {
		background: linear-gradient(90deg, #21D676 0%, #0BBC75 100%);
	}
	
	.buy{
		padding: 7rpx 15rpx;
		background: #fff;
		border-radius: 20rpx;
		color: #0064C6;
		font-weight: bold;
		text-align: center;
	}
</style>
